/**
 * Meituan.com Inc.
 * Copyright (c) 2010-2018 All Rights Reserved.
 */
package com.tuyou.cloud.common.httpclient;

import com.tuyou.cloud.common.po.User;
import org.springframework.web.client.RestTemplate;

/**
 * <p></p>
 *
 * @author tuyou@meituan.com
 * @version v0.1 2018-12-16 11:25 PM tuyou Exp $$
 */
public class HttpClientTest {

    private static RestTemplate restTemplate = new RestTemplate();

    public static void main(String[] args) {

        User user = new User();
        user.setName("tuyou");
        user.setAge(25);
        String str = restTemplate.postForObject("http://localhost:8080/hello", user, String.class);
        System.out.println(str);
    }
}